
#include <cassert>
#include <iostream>
#include <mpi.h>
using namespace std;

int main(int argc, char **argv)
{
  int rank, num_process;
  MPI_Init(&argc, &argv);
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  MPI_Comm_size(MPI_COMM_WORLD, &num_process);

  char process_name[MPI_MAX_PROCESSOR_NAME];
  int name_length;
  MPI_Get_processor_name(process_name, &name_length);

  printf("hello world! process %d of %d on %s \n", rank, num_process, process_name);

  MPI_Finalize();

  return 0;
}